/**
 * vue-router 路由表
 * @author:莫若省
 * staticRoutes 静态路由
 * privilegeRoutes 权限路由
 * anyRoutes 任意路由
 */
export const staticRoutes = [
  {
    path: '/',
    name: 'Root',
    component: () => import('@/layout/index.vue'),
    meta: {
      title: '布局骨架',
      hidden: false,
      icon: '',
    },
    redirect: '/index',
    children: [
      {
        path: '/index',
        component: () => import('@/pages/home/index.vue'),
        name: 'Index',
        meta: {
          title: '首页',
          hidden: false,
          icon: 'HomeFilled',
        },
      },
    ],
  },
  // 数据大屏
  {
    //404
    path: '/dashboard',
    component: () => import('@/pages/dataAnalysis/index.vue'),
    name: 'Dashboard',
    meta: {
      title: '数据大屏',
      hidden: false,
      icon: 'DataAnalysis',
    },
  },
  // 系统配置中心
  {
    path: '/system',
    component: () => import('@/layout/index.vue'),
    name: 'System',
    meta: {
      title: '系统配置中心',
      icon: 'Setting',
    },
    redirect: '/system/user',
    children: [
      {
        path: '/system/resource',
        component: () => import('@/pages/home/index.vue'),
        name: 'Resource',
        meta: {
          title: '资源管理',
          hidden: false,
          icon: 'PieChart',
        },
      },
      {
        path: '/system/role',
        component: () => import('@/pages/home/index.vue'),
        name: 'Role',
        meta: {
          title: '角色管理',
          hidden: false,
          icon: 'Medal',
        },
      },
      {
        path: '/system/user',
        component: () => import('@/pages/home/index.vue'),
        name: 'User',
        meta: {
          title: '用户管理',
          hidden: false,
          icon: 'User',
        },
      },
    ],
  },
  // 系统日志
  {
    path: '/log',
    component: () => import('@/layout/index.vue'),
    name: 'Log',
    meta: {
      title: '系统日志',
      icon: 'Collection',
    },
    redirect: '/log/user',
    children: [
      {
        path: '/log/error',
        component: () => import('@/pages/home/index.vue'),
        name: 'ErrorLog',
        meta: {
          title: '错误日志',
          hidden: false,
          icon: 'Tickets',
        },
      },
      {
        path: '/log/network',
        component: () => import('@/pages/home/index.vue'),
        name: 'NetworkLog',
        meta: {
          title: '网络日志',
          hidden: false,
          icon: 'Memo',
        },
      },
      {
        path: '/log/routes',
        component: () => import('@/pages/home/index.vue'),
        name: 'RoutesLog',
        meta: {
          title: '路由日志',
          hidden: false,
          icon: 'Notebook',
        },
      },
    ],
  },
  // 404页面
  {
    //404
    path: '/404',
    component: () => import('@/pages/notFound404/index.vue'),
    name: 'NotFound404',
    meta: {
      title: '404',
      hidden: true,
      icon: 'DocumentDelete',
    },
  },
  // 未匹配路由重定向404
  {
    //任意路由
    path: '/:pathMatch(.*)*',
    redirect: '/404',
    name: 'Any',
    meta: {
      title: '任意路由',
      hidden: true,
    },
  },
];
export const privilegeRoutes = [];
export const anyRoutes = [];
